﻿<UserControl x:Class="XWord.WPF.ApplicationFramework.TestModules.validationsimple.TypeValidationSimple"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:validations="http://schemas.xword.com/winfx/xaml/info"
    Height="300" Width="300">
    <Grid>
        <TabControl>

            <TabItem Header="TestString">
               <StackPanel>
                  <TextBox x:Name="Element_TextBox"></TextBox>
                  <ListBox x:Name="Element_ListBox"></ListBox>
                    <validations:ObjectCollectionValidator GapValidateSecond="0.1" Property="{Binding Text,ElementName=Element_TextBox}" Collection="{Binding ItemsSource,ElementName=Element_ListBox}" />
                </StackPanel>
             </TabItem>
            <TabItem Header="TestObject">
                <StackPanel>
                    <TextBox x:Name="Element_TextBox2"></TextBox>
                    <ListBox x:Name="Element_ListBox2" DisplayMemberPath="Name"></ListBox>
                    <validations:ObjectCollectionValidator MatchProperty="Name" GapValidateSecond="0.1" Property="{Binding Text,ElementName=Element_TextBox2}" Collection="{Binding ItemsSource,ElementName=Element_ListBox2}" />
                </StackPanel>
            </TabItem>
        </TabControl>
    </Grid>
</UserControl>
